home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / dist / gdb / tm-sysv4.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-19  |  1.8 KB  |  36 lines

  1. /* Macro definitions for GDB on all SVR4 target systems.
  2.    Copyright (C) 1991, 1992, Free Software Foundation, Inc.
  3.    Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
  4.  
  5. This file is part of GDB.
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. #include "solib.h"    /* Support for shared libraries. */
  22.  
  23. /* For SVR4 shared libraries, each call to a library routine goes through
  24.    a small piece of trampoline code in the ".init" section.  Although each
  25.    of these fragments is labeled with the name of the routine being called,
  26.    the gdb symbol reading code deliberately ignores them so it won't confuse
  27.    them with the real functions.  It does however know about the label that
  28.    precedes all of the fragments, which is "_init".  Thus when we lookup a
  29.    function that corresponds to a PC value which is in one of the trampoline
  30.    fragments, we'll appear to be in the function "_init".  The following
  31.    macro will evaluate to nonzero when NAME is valid and matches "_init".
  32.    The horribly ugly wait_for_inferior() routine uses this macro to detect
  33.    when we have stepped into one of these fragments. */
  34.  
  35. #define IN_SOLIB_TRAMPOLINE(pc,name) ((name) && (strcmp ("_init", name) == 0))
  36.